package com.oa.cc.dao;

import org.springframework.beans.factory.BeanFactory;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.oa.domain.Dept;
import com.oa.domain.Emp;


public class Test {
	public static void testsavetEmp2(){
		BeanFactory bf = new ClassPathXmlApplicationContext(
				"service/cc.xml");
		EmpDao empdao = (EmpDao) bf.getBean("ccempdao");
		Emp e = new Emp();
		Dept dept = new Dept();
		dept.setDeptno(101);
		e.setDept(dept);
		System.out.println(empdao.getEmpsByExample(e).size());
		
		//empdao.getEmp();
	}
	public static void main(String[] args) {
		testsavetEmp2();
	}
}
